-
-
Notifications
You must be signed in to change notification settings - Fork 66
feat: add support for parsing async_sequence<T>
type
#775
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is now ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly fine, but I do not see the change corresponding to constants:
Async iterables must not be used as the type of an attribute or constant.
The Constant interface currently has no validate() but it'll be called automatically by Container when you add it.
@lucacasonato, ping on updating in response to @saschanaz's comments so we can start propagating this through the spec ecosystem. |
I should probably do this myself... |
lib/productions/attribute.js
Outdated
@@ -75,7 +75,9 @@ export class Attribute extends Base { | |||
yield* this.extAttrs.validate(defs); | |||
yield* this.idlType.validate(defs); | |||
|
|||
if (["sequence", "record"].includes(this.idlType.generic)) { | |||
if ( | |||
["async iterable", "sequence", "record"].includes(this.idlType.generic) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Per whatwg/webidl#1489 this PR should be updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And per #1500 it should be updated a little more, to use the token async_sequence
instead.
async iterable<T>
typeasync_sequence<T>
type
The grammar isn't wrong but it's not valid. It's covered in invalid/idl instead.
Thanks! |
Adds support for
async iterable<T>
(whatwg/webidl#1397).